/*
 * IndividualInfoSynchronizator.hpp
 *
 *  Created on: 11-01-2011
 *      Author: Przemek
 */

#pragma once

#include "gui/MouseListener.hpp"
#include "gui/Slider.hpp"
#include "world/Individual.hpp"

/*
 * Sets the selected individual state based on sliders states.
 */
class IndividualInfoSynchronizator: public MouseListener
{
	private:
		Individual* individual;
		const Slider* hungerSlider;
		const Slider* thirstSlider;
		const Slider* libidoSlider;
		const Slider* lifeSlider;
		const Slider* angleSlider;

	public:
		IndividualInfoSynchronizator(Individual* individual, const Slider* hungerSlider,
				const Slider* thirstSlider, const Slider* libidoSlider, const Slider* lifeSlider,
				const Slider* angleSlider);
		void mouseReleased(const MouseListener::EventArguments& arguments);
		void mouseDragged(const MouseListener::EventArguments& arguments);

	private:
		void synchronize();
};
